import request from '@/config/axios'

// 创建官网视频
export function createVideo(data) {
  return request({
    url: '/ow/video/create',
    method: 'post',
    data: data
  })
}

// 更新官网视频
export function updateVideo(data) {
  return request({
    url: '/ow/video/update',
    method: 'put',
    data: data
  })
}

// 删除官网视频
export function deleteVideo(id) {
  return request({
    url: '/ow/video/delete?id=' + id,
    method: 'delete'
  })
}

// 获得官网视频
export function getVideo(id) {
  return request({
    url: '/ow/video/get?id=' + id,
    method: 'get'
  })
}

// 获得官网视频分页
export function getVideoPage(query) {
  return request({
    url: '/ow/video/page',
    method: 'get',
    params: query
  })
}

// 导出官网视频 Excel
export function exportVideoExcel(query) {
  return request({
    url: '/ow/video/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
